<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>发设计需求单->到平台</title>
	<link rel="stylesheet" type="text/css" href="../css/reset.css" th:href="@{${uiPath} + ${appName} + '/css/reset.css'}"/>
    <link rel="stylesheet" type="text/css" href="../css/wrr.css" th:href="@{${uiPath} + ${appName} + '/css/wrr.css'}" />
    <link rel="stylesheet" type="text/css" href="../css/zdialog.css"  th:href="@{${uiPath} + ${appName} + '/css/zdialog.css'}"/>

</head>
<body>
<div class="zong">
	<div class="toubu">
     <a href="LookSheJiShi.html">
         <img class="fanhui" src="../images/raw_1503386635.png" alt="" th:src="@{${uiPath} + ${appName} + '/images/raw_1503386635.png'}"></a>
      <p class="biaoti">发设计需求单->到平台</p>
     </div> 
      <div class="topkuai"></div>
      <div class="tupian">
      	<img src="../images/raw_1503395389.jpeg" alt="" th:src="@{${uiPath} + ${appName} + '/images/raw_1503395389.jpeg'}">
      </div>
    <form  id="commentForm" th:action="@{'/ownerDemand/ownerSaveDemand'}" method="post">

    <div class="xiaoquMessage" th:if="${type==0}">
      	<ul>
            <li class="xiasi">
                <span>当前城市：</span>
                <input class="tianru" type="text" th:value="${configRegion.regionName}" readonly>

            </li>
      		<li class="xiasi">
      		 <span>小区名称：</span>
                <input class="tianru" type="text" name="callName">

            </li>
          <li class="xiasikuang">
           <span class="tishiditu">选择位置(大约位置)</span>
              <input id="xiandadress" readonly="readonly" placeholder="点击选择地址" class="dianpumaiso" type="text" value="" name="address" onclick="mapTianchuClick()">
              <input id="longitude" class="dianpumaiso klkl" name="lng" type="hidden" value="0" >
              <input id="dimension" class="dianpumaiso klkl" name="lat" type="hidden" value="0" >
           <p class="xianshiweizhi"></p>
          </li>
          <li class="xiasi">
            <div class="qucitylist">
              <select class="quselecity" name="callRoom">
               <option value="1">1室</option>
               <option value="2">2室</option>
               <option value="3">3室</option>
               <option value="4">4室</option>
                <option value="5">5室</option>
              </select>
            </div>
           <div class="qucitylist ero">
            <select class="quselecity" name="callHall">
            <option value="1">1厅</option>
            <option value="2">2厅</option>
            <option value="3">3厅</option>
           </select>
          </div>
        <div class="qucitylist ero">
         <select class="quselecity" name="callToilet">
          <option value="1">1卫</option>
          <option value="2">2卫</option>
        </select>
       </div>
          </li>
      		<li class="xiasi">
      		 <span>装修面积：</span>
      		 <input class="tianru" type="text" name="callAcreage">
      		</li>
          <li class="xiasi">
           <span>楼号(选填)：</span>
           <input class="tianru" type="text" name="callNo">
          </li>
          <li class="xiasi">
           <span>单元号(选填)：</span>
           <input class="tianru" type="text" name="callUnit">
          </li>
          <li class="xiasi">
           <span>房号(选填)：</span>
           <input class="tianru" type="text" name="callHouse">
          </li>
      		<li class="xiasi">
      		 <span>联系电话：</span>
      		 <input class="tianru" type="text" name="callPhone" id="callPhone">
      		</li>
            <li class="xiasi">
                <span>联系电话：</span>
                <input class="tianru" type="text" name="callWechat">
            </li>
      		<li class="xiasi">
      		 <span class="yusuanzhuangx">装修预算</span>
            <form class="qucitylist yusuanyixia">
              <select class="quselecity" name="callBudget">
               <option value="3-5万">3-5万</option>
               <option value="5-8万">5-8万</option>
               <option value="8-12万">8-12万</option>
               <option value="12-25万">12-25万</option>
                <option value="25万以上">25万以上</option>
              </select>
            </form>
      		</li>

            <li class="xiasi">
                <div class="qucitylist">
                    <select class="quselecity" name="styleId" id="styleId">
                        <option  th:each="style:${styleList}" th:text="${style.configStyle}" th:value="${style.id}">1室</option>
                    </select>
                </div>
            </li>
          <li class="xiasi"  >
          <p class="shanghcuhuxingru"   >选择参考案例</p>
           <p class="chuanzhuangtai">未选择</p>
           <p class="rseledcd" onclick="xuanzeanli();"  >点击选择</p>
           <p class="righddd"  ></p>
          </li>
      	</ul>
      </div>
        <div class="xiaoquMessage" th:if="${type==1}">
            <ul>
                <li class="xiasi">
                    <span>当前城市：</span>
                    <input class="tianru" type="text" th:value="${configRegion.regionName}" readonly>

                </li>
                <li class="xiasi">
                    <span>小区名称：</span>
                    <input class="tianru" type="text" name="callName" th:value="${dneedsDesigner.callName}">

                </li>
                <li class="xiasikuang">
                    <span class="tishiditu">选择位置(大约位置)</span>
                    <input id="xiandadress" readonly="readonly" placeholder="点击选择地址" class="dianpumaiso" type="text" value="" name="address" th:value="${dneedsDesigner.address}" onclick="mapTianchuClick()">
                    <input id="longitude" class="dianpumaiso klkl" name="lng" type="hidden" value="0" th:value="${dneedsDesigner.lng}" >
                    <input id="dimension" class="dianpumaiso klkl" name="lat" type="hidden" value="0" th:value="${dneedsDesigner.lat}">
                    <p class="xianshiweizhi"></p>
                </li>
                <li class="xiasi">
                    <div class="qucitylist">
                        <select class="quselecity" name="callRoom">
                            <option th:value="${dneedsDesigner.callRoom}"  th:text="${dneedsDesigner.callRoom}+'室'" ></option>
                            <option value="1" th:if="${dneedsDesigner.callRoom!=1}" >1室</option>
                            <option value="2" th:if="${dneedsDesigner.callRoom!=2}">2室</option>
                            <option value="3" th:if="${dneedsDesigner.callRoom!=3}">3室</option>
                            <option value="4" th:if="${dneedsDesigner.callRoom!=4}">4室</option>
                            <option value="5" th:if="${dneedsDesigner.callRoom!=5}">5室</option>
                        </select>
                    </div>
                    <div class="qucitylist ero">
                        <select class="quselecity" name="callHall">
                            <option th:value="${dneedsDesigner.callHall}"  th:text="${dneedsDesigner.callHall}+'厅'" ></option>

                            <option value="1" th:if="${dneedsDesigner.callHall!=1}">1厅</option>
                            <option value="2" th:if="${dneedsDesigner.callHall!=2}">2厅</option>
                            <option value="3" th:if="${dneedsDesigner.callHall!=3}">3厅</option>
                        </select>
                    </div>
                    <div class="qucitylist ero">
                        <select class="quselecity" name="callToilet">
                            <option th:value="${dneedsDesigner.callToilet}"  th:text="${dneedsDesigner.callToilet}+'卫'" ></option>

                            <option value="1" th:if="${dneedsDesigner.callToilet!=1}">1卫</option>
                            <option value="2" th:if="${dneedsDesigner.callToilet!=2}">2卫</option>
                        </select>
                    </div>
                </li>
                <li class="xiasi">
                    <span>装修面积：</span>
                    <input class="tianru" type="text" name="callAcreage" th:value="${dneedsDesigner.callAcreage}">
                </li>
                <li class="xiasi">
                    <span>楼号(选填)：</span>
                    <input class="tianru" type="text" name="callNo" th:value="${dneedsDesigner.callNo}">
                </li>
                <li class="xiasi">
                    <span>单元号(选填)：</span>
                    <input class="tianru" type="text" name="callUnit" th:value="${dneedsDesigner.callUnit}">
                </li>
                <li class="xiasi">
                    <span>房号(选填)：</span>
                    <input class="tianru" type="text" name="callHouse" th:value="${dneedsDesigner.callHouse}">
                </li>
                <li class="xiasi">
                    <span>联系电话：</span>
                    <input class="tianru" type="text" name="callPhone" id="callPhone"  th:value="${dneedsDesigner.callPhone}">
                </li>
                <li class="xiasi">
                    <span>联系微信：</span>
                    <input class="tianru" type="text" name="callWechat" th:value="${dneedsDesigner.callWechat}">
                </li>
                <li class="xiasi">
                    <span class="yusuanzhuangx">装修预算</span>
                    <form class="qucitylist yusuanyixia">
                        <select class="quselecity" name="callBudget">
                            <option th:value="${dneedsDesigner.callBudget}"  th:text="${dneedsDesigner.callBudget}" ></option>

                            <option value="3-5万" th:if="${dneedsDesigner.callBudget!='3-5万'}">3-5万</option>
                            <option value="5-8万" th:if="${dneedsDesigner.callBudget!='5-8万'}">5-8万</option>
                            <option value="8-12万" th:if="${dneedsDesigner.callBudget!='8-12万'}">8-12万</option>
                            <option value="12-25万" th:if="${dneedsDesigner.callBudget!='12-25万'}">12-25万</option>
                            <option value="25万以上" th:if="${dneedsDesigner.callBudget!='25万以上'}">25万以上</option>
                        </select>
                    </form>
                </li>
        <!--        <li class="xiasi">
                    <p class="shanghcuhuxingru">上传户型图(选填)</p>
                    <p class="chuanzhuangtai"></p>
                    <p class="rseledcd">点击选择</p>
                    <p class="righddd"></p>
                </li>-->
                <li class="xiasi">
                    <div class="qucitylist">
                        <select class="quselecity" name="styleId" id="styleId">
                            <option  th:each="style:${styleList}" th:text="${style.configStyle}" th:value="${style.id}">1室</option>
                        </select>
                    </div>
                </li>
                <li class="xiasi"  >
                    <p class="shanghcuhuxingru"   >选择参考案例</p>
                    <p class="chuanzhuangtai" th:text="${configPtanli.title}">未选择</p>
                    <input type="hidden" name="styleAnli" th:value="${configPtanli.id}">
                    <p class="rseledcd" onclick="xuanzeanli();"  >点击选择</p>
                    <p class="righddd"></p>
                </li>
            </ul>
        </div>
    </form>
      <div class="fabuxuq" th:onclick="'save()'">
      	<p class="ffbb">发布需求</p>
      </div>
    <div class="mapalert">
        <input class="shurudizi" type="text" placeholder="请输入位置" oninput="getInput()">
        <p class="shousuo">搜索</p>
        <div id="resultd"></div>

    </div>

</div>
<input type="hidden" id="tobaiduCity" th:value="${configRegion.regionName}">

	<script type="text/javascript" src="../js/flexible.js" th:src="@{${uiPath} + ${appName} + '/js/flexible.js'}"></script>
    <script type="text/javascript" src="../js/jquery.min.js" th:src="@{${uiPath} + ${appName} + '/js/jquery.min.js'}"></script>
<script type="text/javascript" src="../js/zdialog.js" th:src="@{${uiPath} + ${appName} + '/js/zdialog.js'}"></script>
<script type="text/javascript" src="../js/cydizi.js" th:src="@{${uiPath} + ${appName} + '/js/cydizi.js'}"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=BCy4SdrGcsabvjyoQbOMcW3kIyoV6xFL"></script>

<script type="text/javascript" src="../js/gz.js" th:src="@{${uiPath} + ${appName} + '/js/gz.js'}"></script>
<script th:inline="JAVASCRIPT">
    function xuanzeanli() {
        $.DialogByZ.Loading(/*[[${uiPath}+${appName}+'/images/loading.png']]*/)
        $.ajax({
            type:'post',
            url:'/ownerDemand/ownerStyle',
            data:$('#commentForm').serialize(),
            dataType:'json',
            success:function (result) {
                if(result.code==1){
                    $.DialogByZ.Close();
                    window.location.href="/ownerDemand/getStyle?id="+$('#styleId').val();
                }else{
                    $.DialogByZ.Close();
                    $.DialogByZ.Alert({Title: "提交失败", Content:result.data  ,BtnL:"确定"})
                }
            }
        })

    }
    function save(){
        $.DialogByZ.Loading(/*[[${uiPath}+${appName}+'/images/loading.png']]*/)
        $.ajax({
            type:'post',
            url:$('#commentForm').attr('action'),
            data:$('#commentForm').serialize(),
            dataType:'json',
            success:function (result) {
                if(result.code==1){
                    $.DialogByZ.Close();
                    $.DialogByZ.Alert({Title: "提交成功", Content:result.data  ,BtnL:"确定"})
                }else{
                    $.DialogByZ.Close();
                    $.DialogByZ.Alert({Title: "提交失败", Content:result.data  ,BtnL:"确定"})
                }
            }
        })
    }

    </script>
</body>
</html>